<!--conf
<sample>
              <product version="1.4" edition="pro"/>
                     <modifications>
                            <modified date="070101"/>
                     </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Grid linked to menu</title>
	
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	
</head>
<body>
	<h1>Grid linked to menu</h1>
	
	<p>Excell "context" allows to set menu as editor for grid's cell. Just try to edit column with authors.</p>
	<table width="600px">
		<tr>
			<td>
				<div id="gridbox" style="width:100%;height:270px;background-color:white;"></div>
			</td>
		</tr>
		<tr>
			<td>
				<div id="context" ></div>
            </td>
		</tr>
	</table>




<script>
window.onload = function() {
	menu = new dhtmlXMenuObject();
	menu.setIconsPath("../common/images/");
	menu.renderAsContextMenu();
	
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
	mygrid.setInitWidths("50,150,100,80,80,80,80,200")
	mygrid.setColAlign("right,left,left,right,center,left,center,center")
	mygrid.setColTypes("dyn,ed,context,price,ch,co,ra,ro");
	mygrid.setSubContext(menu,2,0);
	mygrid.init();
	mygrid.setSkin("dhx_skyblue");

	menu.loadStruct("../common/_context.xml",function(){
		mygrid.loadXML("../common/grid.xml");
	});
}
</script>

</body>
</html>
